package com.xiaowu.mapper;

import com.xiaowu.pojo.Blind;
import com.xiaowu.pojo.Blindgister;
import com.xiaowu.pojo.Volunteer;
import com.xiaowu.pojo.Volunteergister;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface VolunteerMapper {
    @Select("select id,userId,passWord,registerDate from volunteerlogin")
    List<Volunteer> list();

    @Delete("delete from volunteerlogin  where id=#{id}")
    void delete(Integer id);

    @Insert("insert into volunteerlogin(userId, passWord, registerDate, loginStatus, onLineStatus) values(#{userId}, #{passWord}, #{registerDate}, #{loginStatus}, #{onLineStatus})")
    void insert(Volunteergister volunteer);

    @Select("select id,userId,passWord,registerDate from volunteerlogin")
    List<Volunteer> listByPage();

    List<Volunteer> listByPages(String userId, String onLineStatus);
}
